<template>
    <div class="content">
        <div class="title">
            <div class="le">Pools</div>
            <van-icon color="#fff" size="20px" name="coupon-o" />
        </div>
        <div class="item1">
            <div class="bac">
                <div class="ti1">BTB 質押</div>
                <div class="ti2">1095138.90499097</div>
                <div class="cont">
                    <div class="le">
                        <div class="ti1">34209.64735</div>
                        <div class="ti2">累計產出</div>
                    </div>
                    <div class="ri">
                        <div class="ti1">5000</div>
                        <div class="ti2">今日產出</div>
                    </div>
                </div>
            </div>
            <div class="item">
                <div class="le">昨日最佳持幣區</div>
                <div class="ri">50.71993041(0.67715903)</div>
            </div>
            <div class="item">
                <div class="le">礦工數</div>
                <div class="ri">3532</div>
            </div>
        </div>
        <div class="cutdown">
            <div class="tit">今日結算倒數計時</div>
            <van-count-down class="cut" :time="time" />
        </div>
        <div class="pledge">
            <div class="pledgeitem">
                <div class="le">我的質押</div>
                <div class="ri">0 BTB</div>
            </div>
            <div class="pledgeitem">
                <div class="le">我的質押</div>
                <div class="ri">0 BTB</div>
            </div>
            <div class="btn">
                <div class="btnitem">質押</div>
                <div class="btnitem">贖回</div>
            </div>
            <div class="pledgeitem">
                <div class="le">Pools</div>
                <div class="ri">0 BTB</div>
            </div>

        </div>
        <div @click="add" class="transfer">轉帳</div>
        <div class="hash">Hash power</div>
        <div class="item1">
            <div class="bac">
                <div class="ti1">BTB 總算力</div>
                <div class="ti2">1095138.90499097</div>
                <div class="cont">
                    <div class="le">
                        <div class="ti1">34209.64735</div>
                        <div class="ti2">累計產出</div>
                    </div>
                    <div class="ri">
                        <div class="ti1">5000</div>
                        <div class="ti2">今日產出</div>
                    </div>
                </div>
            </div>
            <div class="item">
                <div class="le">昨日最佳持幣區</div>
                <div class="ri">50.71993041(0.67715903)</div>
            </div>
            <div class="item">
                <div class="le">礦工數</div>
                <div class="ri">3532</div>
            </div>
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue';

const time = ref(30 * 60 * 60 * 1000);

async function add() {

}
</script>

<style lang="scss" scoped>
.content {
    padding: 44px 15px 15px 15px;
    background-color: #17171a;
}

.title {
    display: flex;
    justify-content: space-between;
    align-items: center;

    .le {
        height: 24px;
        width: 100%;
        font-size: 20px;
        font-weight: 500;
        color: #fff;
        padding: 15px 0;
    }
}

.item1 {
    width: 100%;
    height: 204px;
    background-color: #2e323b;
    border-radius: 10px;
    padding: 15px;
    box-sizing: border-box;

    .bac {
        width: 100%;
        height: 112px;
        background-image: url('@/assets/pool/pool.png');
        background-size: 100% 100%;
        border-radius: 10px;
        padding: 15px;
        box-sizing: border-box;

        .ti1 {
            font-size: 12px;
            color: #a8aeae;
            text-align: center;
        }

        .ti2 {
            font-size: 22px;
            font-weight: 500;
            color: #fff;
            text-align: center;
        }

        .cont {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 14px;
            width: 100%;
            height: 30px;

            .le {
                width: 50%;
                height: 30px;

                .ti1 {
                    font-size: 14px;
                    color: #fff;
                }

                .ti2 {
                    font-size: 12px;
                    color: #a8aeae;
                }
            }

            .ri {
                width: 50%;
                height: 30px;

                .ti1 {
                    font-size: 14px;
                    color: #fff;
                }

                .ti2 {
                    font-size: 12px;
                    color: #a8aeae;
                }
            }
        }
    }

    .item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 10px;
        width: 100%;

        .le {
            font-size: 14px;
            color: #a8aeae;
        }

        .ri {
            font-size: 14px;
            color: #fff;
        }
    }
}

.cutdown {
    width: 100%;
    height: 87px;
    background: url('@/assets/pool/down.png') no-repeat 100% 100%;
    border-radius: 10px;
    margin-top: 10px;
    padding: 16px;
    box-sizing: border-box;
    text-align: center;

    .tit {
        font-size: 14px;
        color: #a8aeae;
        text-align: center;
    }

    .van-count-down {
        color: #fff;
        font-size: 22px;
        margin-top: 14px;
    }
}

.pledge {
    width: 100%;
    height: 170px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 14px;

    .pledgeitem {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 14px;
        margin-bottom: 8px;

        .le {
            color: #a8aeae;
        }

        .ri {
            color: #fff;

        }
    }

    .btn {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin: 10px 0;

        .btnitem {
            width: 49%;
            height: 43px;
            background-color: #f2ce3d;
            text-align: center;
            line-height: 43px;
            font-size: 15px;
            border-radius: 4px;
        }
    }
}

.transfer {
    width: 100%;
    height: 43px;
    background-color: #f2ce3d;
    text-align: center;
    line-height: 43px;
    font-size: 15px;
    border-radius: 4px;
}

.hash {
    width: 100%;
    font-size: 22px;
    color: #fff;
    margin: 10px 0 7px 0;
}
</style>